package com.example.demo.controller;

import com.example.demo.entity.DocdepartmentEntity;
import com.example.demo.service.DocdepartmentService;
import com.example.demo.tool.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "医院科室接口")
public class DocdepartmentController {
    @Autowired
    private DocdepartmentService docdepartmentService;

    @GetMapping("getDoctorDepartment")
    @ApiOperation("获取所有科室名称")
    public ResponseResult docdepart(){
        List<DocdepartmentEntity>data = docdepartmentService.list();
        return ResponseResult.success(data);
    }
}
